module Mix.Views {
    /**
    * Home
    * 游戏的主界面
    * 承载所有游戏相关操作界面
    */
    export class Main extends Mix.Views.BaseViews {
        public play:majiang.Views.Play;
        public balance:majiang.Views.Balance;

        constructor(){
            super();

            this.play = new majiang.Views.Play();
            this.balance = new majiang.Views.Balance();
            this.addChild(this.play);
            this.addChild(this.balance);
        }
        
        public initCreationComplete(){
            super.initCreationComplete();
        }

        /**
         * 切换层
         * @param layerName 需要切换到层的名字
         */
        public gotoLayer(layerName:string) {
            
        }

        /**
         * closeBalance
         */
        public closeBalance() {
            this.balance.visible = false;
            this.balance.touchChildren = false;
            this.play.touchChildren = true;
        }

        public openBalance(){
            this.balance.visible = true;
            this.balance.touchChildren = true;
            this.play.touchChildren = false;
        }
    }
}